<template>
  <div>
    <div class="imgBox">
      <img :src="icon" class="mksicon"  @click="goto"/>
      <!--    <i class="el-icon-milk-tea" style="color: #5cb6ff;" @click="goto"></i>-->
    </div>
  </div>
</template>

<script>
import {getToken} from '@/utils/auth'
import prodlogo from '@/assets/logo/prodlogo.png'
export default {
  name: 'Youshuda',
  data() {
    return {
      url: '',
      icon:prodlogo
    }
  },
  created: function () {
    this.url= process.env.VUE_APP_BASE_URL + `/MksAdmin/index.html`
  },
  methods: {
    goto() {
      /**
       * 低零代码平台Token信息
       * key：在header中的属性名
       * val：在header中的token值
       */
      let tokenInfo={
        key:'Authorization',
        val:'Bearer ' + getToken()
      }
      //加密
      let ciphertext=window.btoa(JSON.stringify(tokenInfo));
      //以新窗口打开Java 图形化编程平台
      window.open(this.url+'?token='+ciphertext)
    }
  }
}
</script>

<style scoped>
  .imgBox{
    height: 100%;
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
  .mksicon{
    width: 40px;
  }
</style>
